/**
 * Copyright (c) 2013-Now http://jeesite.com All rights reserved.
 */
package com.jeesite.modules.st.entity;

import org.hibernate.validator.constraints.Length;

import java.math.BigDecimal;
import java.util.Date;
import com.jeesite.common.mybatis.annotation.JoinTable;
import com.jeesite.common.mybatis.annotation.JoinTable.Type;
import com.fasterxml.jackson.annotation.JsonFormat;

import com.jeesite.common.entity.DataEntity;
import com.jeesite.common.mybatis.annotation.Column;
import com.jeesite.common.mybatis.annotation.Table;
import com.jeesite.common.mybatis.mapper.query.QueryType;

/**
 * st_take_stock_billEntity
 * @author HOHD
 * @version 2021-03-09
 */
@Table(name="st_take_stock_detail", alias="a", columns={
		@Column(name="id", attrName="id", label="id", isPK=true),
		@Column(name="material_code", attrName="materialCode", label="物料编号"),
		@Column(name="material_name", attrName="materialName", label="物料名称", queryType=QueryType.LIKE),
		@Column(name="unit", attrName="unit", label="单位"),
		@Column(name="batch_number", attrName="batchNumber", label="批号"),
		@Column(name="warehouse_name", attrName="warehouseName", label="仓位", queryType=QueryType.LIKE),
		@Column(name="warehouse_number", attrName="warehouseNumber", label="库存数量"),
		@Column(name="real_number", attrName="realNumber", label="实际数量"),
		@Column(name="product_date", attrName="productDate", label="生产日期"),
		@Column(name="saved_type", attrName="savedType", label="保质期"),
		@Column(name="pass_date", attrName="passDate", label="过期日期"),
		@Column(name="diff_number", attrName="diffNumber", label="过期日期"),
		@Column(name="parent_id", attrName="parentId.id", label="parent_id"),
		@Column(name="warehouse_id", attrName="warehouseId", label="parent_id"),
		@Column(name="create_date", attrName="createDate", label="parent_id"),
	}, orderBy="a.id ASC"
)
public class StTakeStockDetail extends DataEntity<StTakeStockDetail> {
	
	private static final long serialVersionUID = 1L;
	private String materialCode;		// 物料编号
	private String materialName;		// 物料名称
	private String unit;		// 单位
	private String batchNumber;		// 批号
	private String warehouseName;		// 仓位
	private BigDecimal warehouseNumber;		// 库存数量
	private BigDecimal realNumber;		// 实际数量
	private Date productDate;		// 生产日期
	private Integer savedType;		// 保质期
	private String warehouseId;
	private Date passDate;		// 过期日期
	private StTakeStockBill parentId;		// parent_id 父类
	private BigDecimal diffNumber;

	public BigDecimal getWarehouseNumber() {
		return warehouseNumber;
	}

	public void setWarehouseNumber(BigDecimal warehouseNumber) {
		this.warehouseNumber = warehouseNumber;
	}

	public BigDecimal getRealNumber() {
		return realNumber;
	}

	public void setRealNumber(BigDecimal realNumber) {
		this.realNumber = realNumber;
	}

	public BigDecimal getDiffNumber() {
		return diffNumber;
	}

	public void setDiffNumber(BigDecimal diffNumber) {
		this.diffNumber = diffNumber;
	}

	public String getWarehouseId() {
		return warehouseId;
	}

	public void setWarehouseId(String warehouseId) {
		this.warehouseId = warehouseId;
	}

	public StTakeStockDetail() {
		this(null);
	}


	public StTakeStockDetail(StTakeStockBill parentId){
		this.parentId = parentId;
	}
	
	@Length(min=0, max=20, message="物料编号长度不能超过 20 个字符")
	public String getMaterialCode() {
		return materialCode;
	}

	public void setMaterialCode(String materialCode) {
		this.materialCode = materialCode;
	}
	
	@Length(min=0, max=30, message="物料名称长度不能超过 30 个字符")
	public String getMaterialName() {
		return materialName;
	}

	public void setMaterialName(String materialName) {
		this.materialName = materialName;
	}
	
	@Length(min=0, max=36, message="单位长度不能超过 36 个字符")
	public String getUnit() {
		return unit;
	}

	public void setUnit(String unit) {
		this.unit = unit;
	}
	
	@Length(min=0, max=30, message="批号长度不能超过 30 个字符")
	public String getBatchNumber() {
		return batchNumber;
	}

	public void setBatchNumber(String batchNumber) {
		this.batchNumber = batchNumber;
	}
	
	@Length(min=0, max=36, message="仓位长度不能超过 36 个字符")
	public String getWarehouseName() {
		return warehouseName;
	}

	public void setWarehouseName(String warehouseName) {
		this.warehouseName = warehouseName;
	}
	

	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getProductDate() {
		return productDate;
	}

	public void setProductDate(Date productDate) {
		this.productDate = productDate;
	}
	
	public Integer getSavedType() {
		return savedType;
	}

	public void setSavedType(Integer savedType) {
		this.savedType = savedType;
	}
	
	@JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss")
	public Date getPassDate() {
		return passDate;
	}

	public void setPassDate(Date passDate) {
		this.passDate = passDate;
	}
	
	@Length(min=0, max=36, message="parent_id长度不能超过 36 个字符")
	public StTakeStockBill getParentId() {
		return parentId;
	}

	public void setParentId(StTakeStockBill parentId) {
		this.parentId = parentId;
	}
	
}